package com.jfl.utils;

import com.jfl.base.PageRequest;
import com.jfl.common.RequestParamKey;

/**
 * 转换请求
 * 
 * @author 赵炎
 * @version [V1.00, 2018年12月19日]
 * @since V1.00
 */
public class ConvertRequestUtil
{
    /**
     * 分页请求参数
     * 
     * @return
     * @see [类、类#方法、类#成员]
     */
    public static PageRequest pageRequest()
    {
        return new PageRequest(ServletUtil.getParameterToInt(RequestParamKey.PAGE_NUM), ServletUtil.getParameterToInt(RequestParamKey.PAGE_SIZE), ConvertUtil.camel2Underline(ServletUtil.getParameter(RequestParamKey.ORDER_BY_COLUMN)) + " " + ServletUtil.getParameter(RequestParamKey.IS_ASC).toLowerCase());
    }
}
